package com.domain.req;

import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 新增购物车请求
 */
@Data
public class AddCartReq implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 商品id
     */
    @NotNull(message = "商品id不能为空!")
    private Integer goodsId;

    /**
     * 商品数量
     */
    @NotNull(message = "商品数量不能为空!")
    @Min(value = 0, message = "商品数量不能小于0！")
    private Integer goodsSum;

    /**
     * 收货地址
     */
    @NotNull(message ="收货地址id不能为空!")
    private Integer addressId;
}
